package c.j.a.d.a.k.a;

import c.b.a.a.a;
import java.io.PrintStream;

/* compiled from: XmlPullParserException */
public class f extends Exception {
    public Throwable a = null;

    public f(String str, e eVar, Throwable th) {
        StringBuilder stringBuilder = new StringBuilder();
        StringBuilder stringBuilder2 = new StringBuilder();
        stringBuilder2.append(str);
        stringBuilder2.append(" ");
        stringBuilder.append(stringBuilder2.toString());
        StringBuilder stringBuilder3 = new StringBuilder();
        stringBuilder3.append("(position:");
        a aVar = (a) eVar;
        stringBuilder2 = a.g("XML line #");
        stringBuilder2.append(aVar.g);
        stringBuilder3.append(stringBuilder2.toString());
        stringBuilder3.append(") ");
        stringBuilder.append(stringBuilder3.toString());
        stringBuilder.append("");
        super(stringBuilder.toString());
    }

    public void printStackTrace() {
        if (this.a == null) {
            super.printStackTrace();
            return;
        }
        synchronized (System.err) {
            PrintStream printStream = System.err;
            StringBuilder stringBuilder = new StringBuilder();
            stringBuilder.append(getMessage());
            stringBuilder.append("; nested exception is:");
            printStream.println(stringBuilder.toString());
            this.a.printStackTrace();
        }
    }
}
